package com.pzhu.controller;

import com.pzhu.model.entity.Career;
import com.pzhu.model.help.ResponseResult;
import com.pzhu.service.CareerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author : zqh
 * @Date : 2024/1/3 0003 下午 4:11
 * @Version: 1.0
 */
@Api(tags = "阿姨分类接口")
@RestController
@RequestMapping("/career")
public class CareerController {

    @Autowired
    private CareerService careerService;

    @ApiOperation("查询所有信息")
    @GetMapping("/list")
    public ResponseResult list(){
        List<Career> list = careerService.list();
        Map<String,Object> map=new HashMap<>();
        map.put("careerList",list);
        return ResponseResult.ok(map);
    }
}
